from django.db import models

from books.models import BooksModel
from user.models import UserModel


# Create your models here.
#购物车
class CartModel(models.Model):
    bookid=models.ForeignKey(BooksModel,on_delete=models.CASCADE,verbose_name='图书id')
    userid=models.ForeignKey(UserModel,on_delete=models.CASCADE,verbose_name='用户id')
    count=models.IntegerField(default=1,verbose_name='数量')
    class Meta:
        db_table='cart'